package com.servlet;

import net.netca.bmps.userservice.bo.CertInfo;
import net.netca.bmps.userservice.service.UserService;
import net.netca.bmps.userservice.servicelayer.UserServiceImpl;
import net.netca.gdltax.bpms.webservice.CertServiceClient;
import net.netca.gdltax.bpms.webservice.CertServicePortType;
import net.netca.testwebservice.bo.XMLConfig;

public class TestCert {
	public static void main(String[] args) {
//		CertServiceClient client = new CertServiceClient("http://192.168.0.37:8082/businessmanage/services/CertService");
		CertServiceClient client = new CertServiceClient(XMLConfig.getInstance().getUrl());
		CertServicePortType service = client.getCertServiceHttpPort();
		
		/*String caname = service.getCanameByReqno("20110621000001");
		System.out.println(caname);
		CertInfo certinfo = service.getPersonalCert("20110621000001", 10, "02030405060708FFFFFFFFFFFFFFFF5500000000000000000000000000000000");
		System.out.println((certinfo.getSigncert().getValue())[0]);
		System.out.println(certinfo.getSigndigest().getValue());*/
		
		/*UserService userService=new UserServiceImpl();
		String caname = null;
		try {
			caname = userService.getCanameByReqno("20110616000009");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(caname);*/
		
		boolean result=service.revokeCert("89DC4C7FFA04468AC806C4BADFA68FB0DA765D755B6C6E7AE205EECB50E79FB0", 1);
	}
}
